/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FilmDetailView.java
 *
 * Created on 2011-06-12, 18:33:15
 */

package ca.etsmtl.log660.view;

import ca.etsmtl.log660.configuration.SessionFactoryHelper;
import ca.etsmtl.log660.entity.Film;
import ca.etsmtl.log660.entity.Personne;
import ca.etsmtl.log660.entity.Roles;
import ca.etsmtl.log660.facade.StatsFacade;
import java.awt.event.ActionListener;
import java.sql.SQLException;
import javax.management.relation.Role;
import javax.swing.DefaultListModel;

/**
 *
 * @author iamthegD
 */
public class FilmDetailView extends javax.swing.JPanel {

    public Film film;
    
    /** Creates new form FilmDetailView */
    public FilmDetailView() {
        initComponents();
    }

    public void setDetailFilm(Film film) throws SQLException{
        this.film = film;
        reloadDetails();
    }
    
    private void reloadDetails() throws SQLException{
        
        SessionFactoryHelper.getSessionFactory().getCurrentSession().beginTransaction();
        SessionFactoryHelper.getSessionFactory().getCurrentSession().update(this.film); 
        
        this.jTextFieldTitre.setText(this.film.getTitre());
        this.jTextFieldAnneeSortie.setText(this.film.getAnneeSortie().toString());
        
        DefaultListModel modelPaysProd = new DefaultListModel();
        this.jListPaysProd.setModel(modelPaysProd);
        int pos = 0;
        System.out.println("NB PAYS PROD: "+this.film.getPayses().size());
        for (Object paysProd : this.film.getPayses()) {
            pos = modelPaysProd.getSize();
            modelPaysProd.add(pos, paysProd);
        }
        
        this.jTextFieldLangueOriginale.setText(this.film.getLangue().getNom());
        this.jTextFieldDuree.setText(this.film.getDuree().toString() + " mins");
        
        DefaultListModel modelGenres = new DefaultListModel();
        this.jListGenres.setModel(modelGenres);
        int pos2 = 0;
        System.out.println("NB GENRES: "+this.film.getGenreFilms().size());
        for (Object genre : this.film.getGenreFilms()) {
            pos2 = modelGenres.getSize();
            modelGenres.add(pos2, genre);
        }
        
        this.jTextFieldRealisateur.setText(this.film.getPersonne().getNom()+" "+this.film.getPersonne().getPrenom());
        
        DefaultListModel modelScenaristes = new DefaultListModel();
        this.jListScenariste.setModel(modelScenaristes);
        int pos4 = 0;
        System.out.println("NB SCENARISTES: "+this.film.getPersonnes().size());
        for (Object scenariste : this.film.getPersonnes()) {
            pos4 = modelScenaristes.getSize();
            modelScenaristes.add(pos4, scenariste);
        }
        
        DefaultListModel modelActeurs = new DefaultListModel();
        this.jListActeur.setModel(modelActeurs);
        int pos3 = 0;
        System.out.println("NB ACTEURS: "+this.film.getRoleses().size());
        for (Object acteur : this.film.getRoleses()) {
            pos3 = modelActeurs.getSize();
            modelActeurs.add(pos3, acteur);
        }
        
        this.jTextAreaResumeScenario.setText(this.film.getScenario());

        System.out.println("FILMID: "+this.film.getIdFilm().intValue());
        float coteFilm = StatsFacade.getInstance().findCoteByFilmId(Integer.valueOf(this.film.getVieuxIdRetroc()));
        if(coteFilm != -1)
            this.jTextFieldCote.setText(String.valueOf(coteFilm));
        else
            this.jTextFieldCote.setText("n/a");
        
        // Suggestion de films
        //DefaultListModel modelSuggestion = new DefaultListModel();
        //this.jListSuggestion.setModel(modelSuggestion);
        //int pos5 = 0;
        //for (Object suggestionFilm : StatsFacade.getInstance().findTopThreeCorrelations(Integer.valueOf(this.film.getVieuxIdRetroc()))) {
        //    pos5 = modelSuggestion.getSize();
        //    modelSuggestion.add(pos5, suggestionFilm);
        //}
    }
    
    public void setRealisateurDetails() throws SQLException{
        
        SessionFactoryHelper.getSessionFactory().getCurrentSession().beginTransaction();
        SessionFactoryHelper.getSessionFactory().getCurrentSession().update(this.film); 
        
        this.jTextFieldNom.setText(this.film.getPersonne().getNom()+" "+this.film.getPersonne().getPrenom());
        
        if(this.film.getPersonne().getDateNaissance() != null)
            this.jTextFieldDateNaissance.setText(this.film.getPersonne().getDateNaissance().toString());
        else
            this.jTextFieldDateNaissance.setText("");
        
        if(this.film.getPersonne().getLieuNaissance() != null)
            this.jTextFieldLieuNaissance.setText(this.film.getPersonne().getLieuNaissance());
        else
            this.jTextFieldLieuNaissance.setText("");
        
        if(this.film.getPersonne().getBiographie() != null)
            this.jTextAreaBio.setText(this.film.getPersonne().getBiographie().getSubString(1, 5000)+"...");
        else
            this.jTextAreaBio.setText("");
    }
    
    public void setActeurDetails() throws SQLException{
        
        SessionFactoryHelper.getSessionFactory().getCurrentSession().beginTransaction();
        SessionFactoryHelper.getSessionFactory().getCurrentSession().update(this.film); 
        
        Roles acteur = (Roles)this.jListActeur.getSelectedValue();
        
        this.jTextFieldNom.setText(acteur.getPersonneByIdActeur().getNom()+" "+acteur.getPersonneByIdActeur().getPrenom());
        
        if(acteur.getPersonneByIdActeur().getDateNaissance() != null)
            this.jTextFieldDateNaissance.setText(acteur.getPersonneByIdActeur().getDateNaissance().toString());
        else
            this.jTextFieldDateNaissance.setText("");
        
        if(acteur.getPersonneByIdActeur().getLieuNaissance() != null)
            this.jTextFieldLieuNaissance.setText(acteur.getPersonneByIdActeur().getLieuNaissance());
        else
            this.jTextFieldLieuNaissance.setText("");
        
        if(acteur.getPersonneByIdActeur().getBiographie() != null)
            this.jTextAreaBio.setText(acteur.getPersonneByIdActeur().getBiographie().getSubString(1, 5000)+"...");
        else
            this.jTextAreaBio.setText("");
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jTextFieldTitre = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jTextFieldAnneeSortie = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jListPaysProd = new javax.swing.JList();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldLangueOriginale = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldDuree = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jListGenres = new javax.swing.JList();
        jLabel7 = new javax.swing.JLabel();
        jTextFieldRealisateur = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jListActeur = new javax.swing.JList();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextAreaResumeScenario = new javax.swing.JTextArea();
        jButtonDetailsActeur = new javax.swing.JButton();
        jButtonDetailsRealisateur = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        jTextFieldNom = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jTextFieldDateNaissance = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jTextFieldLieuNaissance = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextAreaBio = new javax.swing.JTextArea();
        jSeparator2 = new javax.swing.JSeparator();
        jButtonEffectuerLoc = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        jListScenariste = new javax.swing.JList();
        jLabel15 = new javax.swing.JLabel();
        jTextFieldCote = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jListSuggestion = new javax.swing.JList();

        jLabel1.setText("Titre:");

        jLabel2.setText("Annee de sortie:");

        jLabel3.setText("Pays de production:");

        jScrollPane1.setViewportView(jListPaysProd);

        jLabel4.setText("Langue originale:");

        jLabel5.setText("Duree du film:");

        jLabel6.setText("Genres:");

        jScrollPane2.setViewportView(jListGenres);

        jLabel7.setText("Realisateur:");

        jLabel8.setText("Scenariste:");

        jLabel9.setText("Acteurs / personnages:");

        jListActeur.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane3.setViewportView(jListActeur);

        jLabel10.setText("Resume scenario:");

        jTextAreaResumeScenario.setColumns(5);
        jTextAreaResumeScenario.setLineWrap(true);
        jTextAreaResumeScenario.setRows(5);
        jScrollPane4.setViewportView(jTextAreaResumeScenario);

        jButtonDetailsActeur.setText("Details acteur");
        jButtonDetailsActeur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDetailsActeurActionPerformed(evt);
            }
        });

        jButtonDetailsRealisateur.setText("Details realisateur");
        jButtonDetailsRealisateur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDetailsRealisateurActionPerformed(evt);
            }
        });

        jLabel11.setText("Nom:");

        jLabel12.setText("Date naissance:");

        jLabel13.setText("Lieu naissance:");

        jLabel14.setText("Biographie:");

        jTextAreaBio.setColumns(5);
        jTextAreaBio.setLineWrap(true);
        jTextAreaBio.setRows(5);
        jScrollPane5.setViewportView(jTextAreaBio);

        jButtonEffectuerLoc.setText("EFFECTUER LOCATION");

        jScrollPane6.setViewportView(jListScenariste);

        jLabel15.setText("Cote moyenne:");

        jLabel16.setText("/5");

        jLabel17.setText("Suggestion de films:");

        jListSuggestion.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "The Godfather", "The Godfather II", "Heat" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane7.setViewportView(jListSuggestion);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButtonEffectuerLoc, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jLabel12)
                            .addComponent(jLabel13)
                            .addComponent(jLabel14))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldDateNaissance, javax.swing.GroupLayout.DEFAULT_SIZE, 601, Short.MAX_VALUE)
                            .addComponent(jTextFieldNom, javax.swing.GroupLayout.DEFAULT_SIZE, 601, Short.MAX_VALUE)
                            .addComponent(jTextFieldLieuNaissance, javax.swing.GroupLayout.DEFAULT_SIZE, 601, Short.MAX_VALUE)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 601, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel7)
                            .addComponent(jLabel8)
                            .addComponent(jLabel9)
                            .addComponent(jLabel10))
                        .addGap(15, 15, 15)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldRealisateur, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldDuree, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldLangueOriginale, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldAnneeSortie, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldTitre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(jButtonDetailsActeur, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButtonDetailsRealisateur)))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldCote, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel16))
                            .addComponent(jLabel17)
                            .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jTextFieldTitre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldAnneeSortie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel4)
                    .addComponent(jTextFieldLangueOriginale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldDuree, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(jLabel7))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRealisateur, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel15)
                            .addComponent(jTextFieldCote, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane7, 0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButtonDetailsRealisateur)
                    .addComponent(jButtonDetailsActeur))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jTextFieldDateNaissance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jTextFieldLieuNaissance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonEffectuerLoc, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonDetailsActeurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDetailsActeurActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonDetailsActeurActionPerformed

    private void jButtonDetailsRealisateurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDetailsRealisateurActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonDetailsRealisateurActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonDetailsActeur;
    private javax.swing.JButton jButtonDetailsRealisateur;
    private javax.swing.JButton jButtonEffectuerLoc;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JList jListActeur;
    private javax.swing.JList jListGenres;
    private javax.swing.JList jListPaysProd;
    private javax.swing.JList jListScenariste;
    private javax.swing.JList jListSuggestion;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTextArea jTextAreaBio;
    private javax.swing.JTextArea jTextAreaResumeScenario;
    private javax.swing.JTextField jTextFieldAnneeSortie;
    private javax.swing.JTextField jTextFieldCote;
    private javax.swing.JTextField jTextFieldDateNaissance;
    private javax.swing.JTextField jTextFieldDuree;
    private javax.swing.JTextField jTextFieldLangueOriginale;
    private javax.swing.JTextField jTextFieldLieuNaissance;
    private javax.swing.JTextField jTextFieldNom;
    private javax.swing.JTextField jTextFieldRealisateur;
    private javax.swing.JTextField jTextFieldTitre;
    // End of variables declaration//GEN-END:variables

    public void addDetailsActeurListener(ActionListener listener) {
        jButtonDetailsActeur.addActionListener(listener);
    }

    public void addDetailsRealisateurListener(ActionListener listener) {
        jButtonDetailsRealisateur.addActionListener(listener);
    }
    
    public void addLocationListener(ActionListener listener) {
        jButtonEffectuerLoc.addActionListener(listener);
    }
}
